package com.mp3.player.vos
{
	import mx.collections.ArrayCollection;
	
	public class History 
	{
		public static const MAX_LENGHT: int = 100;
		
		private var _source: Array;
		
		public function History()
		{
			_source = new Array();
		}
		
		public function push(value: Object): void
		{
			if (_source.length == MAX_LENGHT)
			{
				_source.shift();
			}
			
			_source.push(value);
		}
		
		public function pop(): Object
		{
			return _source.pop();
		}
	}
}